#pragma once
#include "ObjPtrList.h"
#include "Lock.h"
class CMatch;
class CPhase;
class CStage;
class CTable
{
public:
	CTable(void);
	~CTable(void);

	BOOL Begin();
	void End();

	void NotifyCreateGame();
	void NotifyTipText(const char *szText);

	void SetTableId(DWORD dwTableId) {m_dwTableId = dwTableId;};
	DWORD GetTableId() {return m_dwTableId;};

	BOOL OnInitialUpdate(CMatch *pMatch, CPhase *pPhase, CStage *pStage, DWORD dwTableId, CObjPtrList<MatchUser> &listMatchUser);
	void OnGameResult(GMGameResultMsg *pMsg);

public:

	DWORD m_dwTableId;
public:
	CMatch *m_pMatch;
	CPhase *m_pPhase;
    CStage *m_pStage;

	CObjPtrList<MatchUser> m_listMatchUser;
	CObjList<UserGameResult> m_listUserGameResult;
	CLock m_lock;

};